var log4js = require('log4js');
log4js.configure({
    appenders: [
        {
            type: 'console'
        },
        {
            type: 'dateFile',
            filename: 'logs/nodejs-manager.log',
            pattern: "-yyyy-MM-dd.log",
            category: 'fileLog',
            alwaysIncludePattern: false
        }
    ],
    replaceConsole: true,   //替换console.log
    levels: {
        fileLog: 'INFO'
    }
});
module.exports = log4js.connectLogger(log4js.getLogger('fileLog'), {
    level: log4js.levels.INFO,
    format: '"token>:req[token]" "auth_token>:req[auth_token]" "user-agent>:user-agent" :method :url :status , :response-time ms'
});